Xceed Toolkit Plus for WPF v5.1 Documentation
Welcome to Xceed Toolkit Plus for WPF v5.1 / DataGrid, ListBox, Chart, AvalonDock, and PropertyGrid / Datagrid control / Object Model Overview / Other Classes
In This Topic
    Other Classes
    In This Topic

    The other topics discussed in this book deal with the major classes that compose Xceed DataGrid for WPF; however, there are other classes that also play a part in every grid.

    Grouping-related Classes

    When the content of a grid is grouped, complementary information on the group descriptions can be retrieved through a grid's GroupLevelDescriptions property, which contains a GroupLevelDescription object for each group level, such as the field name of the Column whose values were used to create the groups as well as information on the data template that was used to create the Title for the specific group level.

    By default, when a DataGridControl is created it contains a HierarchicalGroupByControl in its fixed headers section. The GroupByControl provides a condensed view of the group levels and allows end users to modify the group descriptions applied to a grid and any existing details. Each group level is represented by a HierarchicalGroupByItem that can be used to change the order of the groups, sort the data items, or remove the groups altogether. In addition, GroupByItems can be consulted to know if it is being dragged—to change the order or remove groups—through the IsBeingDragged property, while the SortDirection property can be used to retrieve the direction in which its associated Column is sorted.

    How the GroupByItems are displayed in a GroupByControl depends on the values of various properties exposed by said control. These include the ConnectionLineAlignment, ConnectionLineOffset, ConnectionLinePen, StairHeight, and StairSpacing properties, which define the appearance of the connection lines and the space between the GroupByItems. When a grid or detail does not contain groups, the value of the NoGroupContent property will be displayed in the GroupByControl.

    If a ColumnManagerRow is present in a grid or detail, its Cells (ColumnManagerCell) can be dragged onto a GroupByControl to create an additional group level in a grid or detail. A ColumnManagerCell's IsBeingDragged property can be consulted to know if it is being dragged to change the order of the Columns or create new groups, while the IsPressed property can be used to know if a Column is being sorted. End users can be prevented from modifying the existing group levels and sorting criteria through the GroupByControl's AllowGroupingModification and AllowSort properties respectively; however, grouping and sorting modifications can still be made programmatically, regardless of the value of the aforementioned properties.

    GroupLevelIndicators indicate the number of group levels in a grid and are contained in a GroupLevelIndicatorPane. The width of the GroupLevelIndicators, when a grid is in a TableView, can be modified through the GroupLevelIndicatorWidth property. The GroupLevelIndicators can be hidden by setting the ShowIndicators attached property of the GroupLevelIndicatorPane to false, on the container or in the container's template whose corresponding indicators are to be hidden.

    HierarchicalGroupLevelIndicatorPanes are used in conjunction with the GroupLevelIndicatorPanes when data items in a detail are grouped,. These panes contain pairs of GroupLevelIndicatorPanes and DetailIndicators that indicate the number of group levels and details, while the standard GroupLevelIndicatorPane indicates the group level information of its detail/context.

    A GroupHeaderControl represents the control used as a Group's header, which is used to expand and collapse its associated Group, as well as display information on said Group's content, including the value that caused it to be created & the data template that was used to create its Title. The realized runtime Group associated with a GroupHeaderControl can be retrieved through its Group property. A Group's Level property indicates to which level a realized Group belongs while the IsBottomLevel property can be consulted to immediately know if it belongs to the last level—which corresponds to the Groups containing the data items. The ItemCount property will return the number of data items contained in a bottom-level Group. In contrast, the parent Groups can be retrieved through the ParentGroups property; however, if consulted for a top-level Groupnull (Nothing in Visual Basic) will be returned. The SiblingGroups property returns the Groups that are at the same level as the caller. Lastly, the IsExpanded property indicates whether a Group is expanded or collapsed.

    For more information on grouping, refer to the Grouping Data topic.